/**
* 作者 ：食草狂魔
*
* 日期 ：2017/11/17
*
* 描述 ：模板管理
*/
<template>
  <el-container class="is-vertical">
    <HeaderBar :menuState="menuState"></HeaderBar>
    <BreadCrumb :options="breadOptions" class="breadcreamb"></BreadCrumb>
    <el-main>
      <ModuleBar :title="moduleBarTitle1"></ModuleBar>
      <el-row class="moduleRow">
        <el-col :span="8" v-for="item in moduleList">
          <TemplateModule :moduleInfo="item" class="moduleItem"></TemplateModule>
        </el-col>
      </el-row>
      <!--<ModuleBar :title="moduleBarTitle2"></ModuleBar>-->
      <!--<el-row class="moduleRow">-->
        <!--<el-col :span="8" v-for="item in moduleList2">-->
          <!--<TemplateModule :moduleInfo="item" class="moduleItem"></TemplateModule>-->
        <!--</el-col>-->
      <!--</el-row>-->
    </el-main>
  </el-container>
</template>
<script>
    import HeaderBar from '../../components/header/Header.vue'
    import BreadCrumb from '../../components/breadcrumb/BreadCrumb.vue'
    import ModuleBar from '../../components/modulebar/ModuleBar.vue'
    import TemplateModule from './components/templateModule/TemplateModule.vue'
    import Config from '../../config/config'

    export default {
        name: 'main',
        components: {
          HeaderBar,
          BreadCrumb,
          ModuleBar,
          TemplateModule
        },
        data () {
          return {
            menuState: "/templateManage/main",
            breadOptions: {
              bread:[
                {
                  label:"政务数据资源管理系统",
                  path:"/"
                },
                {
                  label:"模板管理",
                  path:"/templateManage/main"
                }
              ]
            },
            moduleBarTitle1: "目录模板",
            moduleList: [{
              title: "目录（含分类）",
              buttons: [{
                xtype: "button",
                buttonText: "下  载",
                onClick: () => {
                	//window.open(Config.siteInfo.sites.file_server_url+"/template/downloadTemplate?target=1&token="+localStorage.token+"");
									window.open("http://210.13.50.98:10133/templates/[%E5%90%AB%E5%88%86%E7%B1%BB]%E5%AE%8C%E6%95%B4%E7%9B%AE%E5%BD%95%E6%A8%A1%E6%9D%BF.xlsx")
                }
              }],
              remark: "注：模板含有目录分类，导入时不需要选择导入的子目录，可直接导入目录数据"
            },{
              title: "目录（不含分类）",
              buttons: [{
                xtype: "button",
                buttonText: "下  载",
                onClick: () => {
                	//window.open(Config.siteInfo.sites.file_server_url+"/template/downloadTemplate?target=2&token="+localStorage.token+"");
                	window.open("http://210.13.50.98:10133/templates/[%E4%B8%8D%E5%90%AB%E5%88%86%E7%B1%BB]%E7%9B%AE%E5%BD%95%E6%A8%A1%E6%9D%BF.xlsx")
                }
              }],
              remark: "注：模版不含有目录分类，导入时需要选择导入的子目录"
            },{
              title: "信息项",
              buttons: [{
                xtype: "button",
                buttonText: "下  载",
                onClick: () => {
                	//window.open(Config.siteInfo.sites.file_server_url+"/template/downloadTemplate?target=3&token="+localStorage.token+"");
                	window.open("http://210.13.50.98:10133/templates/[%E4%BF%A1%E6%81%AF%E9%A1%B9]%E7%9B%AE%E5%BD%95%E6%A8%A1%E6%9D%BF.xlsx")
                }
              }],
              remark: "注：可在录入信息资源时批量导入信息项"
            }],
            moduleBarTitle2: "信息项模板",
            moduleList2: [{
              title: "目录（含分类）",
              buttons: [{
                xtype: "button",
                buttonText: "单个校验",
                onClick: () => {
                  //console.log(this);
                }
              }],
              remark: "注：请选择含有目录分类的模板，进行校验时可选择多个模板同时进行校验"
            },{
              title: "目录（不含分类）",
              buttons: [{
                xtype: "button",
                buttonText: "单个校验",
                onClick: () => {
                  //console.log(this);
                }
              }],
              remark: "注：请选择不含目录分类的模板，进行校验时可选择多个模板同时进行校验"
            }],
          }
        }
    }
</script>

<style>
  .moduleRow{
    width: 94%;
    margin: 20px auto;
  }
  .moduleItem{
    width: 98%;
    margin-right: 1%;
  }
  .templateModule .buttonList .moduleButton{
  	height: 36px;
  	width: 25% !important;
  }
  /*footer{
  	width: 100%;
  	position: fixed;
  	bottom: 0;
  	left: 0;
  }*/
</style>
